1. Field of the Invention
The present invention relates to a method for accessing data in a computer, and more particularly, to a method for accessing important data in a computer using a flash memory.
2. Description of the Prior Art
Personal computers (PCs) have become an important tool for contacting people or manipulating digital information. Nowadays, information appliances (IAs), manufactured by using a simplified PC structure, have become more popular because of their low-cost and user-friendly characteristics. Even people who are unskilled with computers can easily handle this kind of information appliance.
Because an x86 PC is a well-known structure in computers, an x86 PC is easily implemented to an information appliance. Please refer to FIG. 1. FIG. 1 is a schematic diagram illustrating a typical x86 PC 10 main structure according to the prior art. The PC 10 comprises a CPU (central processor unit) 12 for manipulating and operating data, a volatile RAM (random access memory) 16 and a flash memory 18 for storing BIOS (basic input/output system) of the PC 10. A north-bridge 14A is electrically connected between the RAM 16 and the CPU 12 and is used for exchanging data with both ends.
When the PC 10 starts up, some procedures such as power on self test, plug-and-play, or even hardware configuration will automatically execute upon reading the BIOS stored in the flash memory 18. When the PC 10 completes the above procedures, the PC 10 will load an operating system software. The operating system software coordinates hardware of the PC 10 with corresponding software by determining the setting of the BIOS.
According to the prior art, the flash memory 18 is only used to store the BIOS information and is only used during the start-up procedure of a computer. Therefore, a large portion of the flash memory 18 is wasted. Because the structure of an information appliance is simple, it only needs a smaller BIOS. Thus the flash memory 18 can be used to store other information besides the BIOS. On the other hand, the access time for the non-volatile flash memory 18 is larger than that of a volatile RAM memory 16, so the use of the flash memory 18 for storing ordinary information is limited.
It is therefore a primary object of the present invention to provide a method for quickly accessing data from a portion of flash memory that stores ordinary information.
According to the present invention, a method for accessing data in a computer can solve the above problem. The computer comprises a non-volatile memory and a volatile memory. The non-volatile memory comprises a first portion and a second portion. The first portion stores the basic input/output system (BIOS) of the computer. The method comprises (a) copying data in the second portion of the non-volatile memory to the volatile memory when the computer starts up, (b) updating data stored in the volatile memory when a user wants to update corresponding data in the second portion of the non-volatile memory, and (c) restoring the data in the volatile memory to the non-volatile memory when the computer is ready to shut down.
It is an advantage of the present invention that any data accessing operation will not directly through the non-volatile memory, but instead from the volatile memory. The present invention will not write back data from the volatile memory to the non-volatile memory until the computer is ready to shut down. Thus possible damage caused by frequently accessing data from the non-volatile memory is avoided and, of course, the lifetime of the non-volatile memory increases. According to the above paragraphs, the present invention has many superior characteristics and also solves the prior arts drawbacks and inconveniences in the field.
These and other objects of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.